package cn.sanshuilin.kst.system.provider.write.dao;

import cn.sanshuilin.kst.system.provider.bean.Share;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author greenlee
 * @version v1.0
 * @create 创建时间: 2017-11-29 9:57
 * Copyright 2017  by 三水林科技有限公司
 **/
public interface ShareDao extends JpaRepository<Share,String> {
    Share findById(String id);
    @Transactional
    @Modifying
    @Query(value = "DELETE FROM share WHERE ID =:ID",nativeQuery = true)
    int removeById(@Param("ID") String ID);
}
